import request from '@/utils/request'

export function fetchMedoleList(data) {
  return request({
    url: '/system/metadataModel/table/list',
    method: 'post',
    data
  })
}
export function addModelData(data) {
    return request({
        url: '/system/metadataModel/table/add',
        method: 'post',
        data
      })
  }
  //获取详情
export function getDetail(id) {
  return request({
    url: '/system/metadataModel/table/detail/' + id,
    method: 'get',
    params: { id }
  })
}
//删除
export function deleteModelData(ids) {
    return request({
      url: '/system/metadataModel/table/delete',
      method: 'post',
      data: { ids }
    })
  }
//更新
export function updateModel(data) {
    return request({
      url: '/system/metadataModel/table/update',
      method: 'post',
      data
    })
  }
  //创建表
  export function buildTable(id) {
    return request({
      url: '/system/metadataModel/table/createTable/' + id,
      method: 'get',
    })
  }
   //删除表
   export function deleteTable(id) {
    return request({
      url: '/system/metadataModel/table/deleteTable/' + id,
      method: 'get',
      params: { id }
    })
  }